package sctu.edu.java.year2016.team01.xuhanmei.day20160618;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;

/**
 * Created by Administrator on 2016/6/18.
 */
public class GameUtil {
    public static Image getImage(String path){
        URL u=GameUtil.class.getClassLoader().getResource(path);
        BufferedImage img=null;
        try {
            img= ImageIO.read(u);
        } catch (IOException e) {
            e.printStackTrace();
        }
return img;
    }
}
